package com.ctbri.containerindepth;

import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.Set;
import java.util.TreeSet;

import com.ctbri.util.Countries;

public class Ex3 {
	public static void main(String[] args) {
		Set<String> set1 = new HashSet<>(Countries.names(10));
		set1.addAll(Countries.names(10));
		set1.addAll(Countries.names(10));
		set1.addAll(Countries.names(10));
		System.out.println("set1 = " + set1);
		
		Set<String> set2 = new LinkedHashSet<>(Countries.names(10));
		set2.addAll(Countries.names(10));
		set2.addAll(Countries.names(10));
		set2.addAll(Countries.names(10));
		System.out.println("set2 = " + set2);
		
		Set<String> set3 = new TreeSet<>(Countries.names(10));
		set3.addAll(Countries.names(10));
		set3.addAll(Countries.names(10));
		set3.addAll(Countries.names(10));
		System.out.println("set3 = " + set3);
	}
}
